<?php
class Zendvn_Acl{
	
	protected $_infoObj;
	public function __construct(){
		$this->_infoObj = new Zendvn_System_Info();
	}
	
	public function isMember(){
		$type = $this->_infoObj->getType();
		$flag = false;
		if($type == "Member"){
			$flag = true;
		}
		return $flag;
	}
	public function isFullAccess(){
		
		$groups = $this->_infoObj->getGroupInfo();
		$flag = false;
		if(count($groups)>0){
			foreach($groups as $key => $val){
				if($val['permission'] == 'Full Access'){
					$flag = true;
					break;
				}
			}
		}
		return $flag;
	}
	
	public function isAdminAccess(){		
		$groups = $this->_infoObj->getGroupInfo();
		$flag = false;
		if(count($groups)>0){
			foreach($groups as $key => $val){
				if($val['group_acp'] == 1){
					$flag = true;
					break;
				}
			}
		}
		return $flag;
	}
}